﻿using IntelligentAgriculture.Domain.Entity;
using IntelligentAgriculture.Domain.Interface.Customerinformations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IntelligentAgriculture.Domain.Impl.CustomerinformationRepository
{
    public class CustomerinformationRepository : ICustomerinformationRepository
    {
        private readonly AgricultureDbContext _context;
        public CustomerinformationRepository(AgricultureDbContext _context)
        {
            this._context = _context;
        }
        /// <summary>
        /// 客户显示功能
        /// </summary>
        /// <returns></returns>
        public async Task<IQueryable<Customerinformation>> GetShow()
        {
            try
            {
                return _context.Customerinformations.Where(x => x.Isdel == false);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
